import java.util.Scanner;

public class Java010 {
    public static void main(String[] args) {
        double h,frequency;
        Scanner sc=new Scanner(System.in);
        System.out.println("从多高落下");
        h=sc.nextDouble();
        System.out.println("反弹多少次");
        frequency= sc.nextDouble();
        fun(h,frequency);
    }
    public static void fun(double h,double frequency){
        double all=0;
        for(int i=0;i<frequency;i++){
            all+=h;
            h/=2;
        }
        System.out.println("hight:"+h+",  all:"+all);
    }
}
